package com.niguang.govt.admin.api.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author 12380
 * @since 2018-12-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("work_site_user")
public class SiteUser extends Model<SiteUser> {

    public static final String ID = "id";
    public static final String TEAM_ID = "team_id";
    public static final String USER_ID = "user_id";
    public static final String QIYE_ID = "qiye_id";
    public static final String SITE_ID = "site_id";
    public static final String SUB_ID = "sub_id";
    public static final String DAY_SALARY = "day_salary";
    public static final String MANAGE_TYPE = "manage_type";
    public static final String SOURCE_TYPE = "source_type";
    public static final String WORK_TYPE_ID = "work_type_id";
    public static final String CREATE_USER_ID = "create_user_id";
    public static final String CREATE_TIME = "create_time";
    public static final String UPDATE_TIME = "update_time";
    public static final String DEL_FLAG = "del_flag";
    public static final String LABOR_COMPANY = "labor_company";
    public static final String LABOR_COMPANY_ID = "labor_company_id";
    public static final String SAFETY_URL = "safety_url";
    public static final String LABOR_URL = "labor_url";
    public static final String PAY_WAY = "pay_way";
    public static final String START_SALARY_DATE = "start_salary_date";
    public static final String MONTH_SALARY = "month_salary";
    public static final String DEPARTURE_TIME = "departure_time";
    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    private Long id;
    /**
     * 班组ID
     */
    private Long teamId;
    /**
     * 用户ID
     */
    private Long userId;
    /**
     * 企业ID
     */
    private Long qiyeId;
    /**
     * 工地ID
     */
    private Long siteId;
    /**
     * 订单编号
     */
    private Long subId;
    /**
     * 每日薪资
     */
    private String daySalary;
    /**
     * 是否是管理员 1--普通用户 2--工地管理员
     */
    private Integer manageType;
    /**
     * 数据来源 1--订单 2--手动添加
     */
    private Integer sourceType;
    /**
     * 工种ID
     */
    private Long workTypeId;
    /**
     * 创建人ID
     */
    private Long createUserId;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    /**
     * 是否删除 0-未删除 1-已删除
     */
    @TableLogic
    private Integer delFlag;
    /**
     * 劳务公司
     */
    private String laborCompany;
    /**
     * 劳务公司id
     */
    private Long laborCompanyId;
    /**
     * 安全信息图片
     */
    private String safetyUrl;
    /**
     * 劳务合同
     */
    private String laborUrl;
    /**
     * 计薪方式 1-点工 2-包工 3-月薪
     */
    private Integer payWay;
    /**
     * 起算时间（月薪）
     */
    private String startSalaryDate;
    /**
     * 月薪资
     */
    private String monthSalary;
    /**
     * 离职时间
     */
    private LocalDateTime departureTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
